import request from "@/utils/request";

// 按照条件进行分页查询文档
export const gmtTaskinfopage = (data: object) => {
  return request.post("/gmtTask/info/page", data);
};

// 按照主键查询脚本信息
export const gmtTaskinfo = (id: string|string[]) => {
  return request.get("/gmtTask/info/"+ id);
};

//按照主键删除文档
export const gmtTaskInfoRemove = (data:Array<Object>) => {
  return request.post("/gmtTask/info/remove", data);
};

//新增脚本信息
export const gmtTaskinfosave = (data: object) => {
  return request.post("/gmtTask/info/save",data);
};

//保存静态脚本内容
export const gmtTaskinfosaveParam = (data: object) => {
  return request.post("/gmtTask/info/param/save",data);
};


//保存文档中的动态脚本配置
export const gmtTaskinfoSaveDynamic = (data: object,id?:string) => {
  return request.post("/gmtTask/info/save/dynamic/"+ id,data);
};

//保存脚本参数信息
export const gmtTaskinfoUpdate = (data: object) => {
  return request.post("/gmtTask/info/update",data);
};

//按照主键删除脚本
export const gmtTaskinfoRemove = (data: Array<Number>) => {
  return request.post("/gmtTask/info/remove",data);
};

//按照主键删除脚本
export const documentgmtTaskSave = (data: Array<Number>) => {
  return request.post("/document/gmtTask/save",data);
};

//执行脚本测试
export const gmtTaskDebug = (id: string|string[]) => {
  return request.get("/gmtTask/debug/"+ id);
};

//查看调试脚本执行结果
export const gmtTaskDebugInfo = (id: string|string[]) => {
  return request.get("/gmtTask/debug/info/"+ id);
};

//查看调试脚本执行结果
export const gmtTaskExcute = (id: string|string[]) => {
  return request.get("/gmtTask/excute/task/"+ id);
};